package com.usian.controller;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TopicMessageController {

    @Autowired
    private AmqpTemplate amqpTemplate;

    @RequestMapping("sendTopic")
    public String sendTopic(){
        amqpTemplate.convertAndSend("exchange_topic","item.juanjuan","卷卷同学");
        return "ok";
    }

}
